package com.wjp.oa.interceptor;

import com.mySpringMvc.web.servlet.HandlerInterceptor;
import com.mySpringMvc.web.servlet.ModalAndView;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

/**
 * @program: mySSM
 * @description: 拦截器2
 * @author:wjp
 * @create: 2025-02-13 23:08
 **/
public class Interceptor2 implements HandlerInterceptor {
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        System.out.println("interceptor2 preHandle");
        return true;
    }

    @Override
    public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModalAndView modalAndView) throws Exception {
        System.out.println("interceptor2 postHandle");
    }

    @Override
    public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, ModalAndView modalAndView) throws Exception {
        System.out.println("interceptor2 afterCompletion");
    }
}
